<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SprintReview.aspx.cs" Inherits="SprintReview" Title="Tackle - Sprint Review" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHolder" Runat="Server">
    <strong>Sprint Review<br />
        <br />
    </strong><span style="font-size: 8pt">Select a sprint to view the associated sprint review document.<br />
        <br />
        <table cellpadding="4" cellspacing="0" style="width: 98%">
            <tr bgcolor="#e3eaeb">
                <td style="border-right: silver 1px ridge; border-top: silver 1px ridge; border-left: silver 1px ridge;
                    border-bottom: silver 1px ridge" valign="top">
                    <span style="font-size: x-small">Sprint: </span>
        <asp:DropDownList ID="ddSprintSelection" runat="server" AutoPostBack="True" DataSourceID="dsGetSprintNames"
            DataTextField="SprintName" DataValueField="SprintID" Font-Size="X-Small" OnDataBound="ddSprintSelection_DataBound"
            OnSelectedIndexChanged="ddSprintSelection_SelectedIndexChanged">
        </asp:DropDownList></td>
            </tr>
            <tr>
                <td valign="top">
        <rsweb:ReportViewer ID="rptSprintReviewViewer" runat="server" Width="100%" Font-Names="Verdana" Font-Size="8pt" Height="400px">
            <LocalReport ReportPath="SprintReview.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="odsScrumTeamPrefs" Name="DataSet1_ScrumTeamPrefs" />
                    <rsweb:ReportDataSource DataSourceId="odsSprintFeatureSummary" Name="DataSet1_SprintReviewFeatureSummary" />
                    <rsweb:ReportDataSource DataSourceId="odsSprintInfo" Name="DataSet1_SprintInformationForStatus" />
                    <rsweb:ReportDataSource DataSourceId="odsSprintFeatureDisc" Name="DataSet1_SprintReviewDiscoveredSummary" />
                    <rsweb:ReportDataSource DataSourceId="odsSprintTotals" Name="DataSet1_GetSprintTotalsForUser" />
                    <rsweb:ReportDataSource DataSourceId="dsBurnDownChart" Name="DataSet1_GenerateBurnDownChart" />
                    <rsweb:ReportDataSource DataSourceId="odsSprintRetrospective" Name="DataSet1_SprintRetrospectiveNotes" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
                    &nbsp; &nbsp; &nbsp;&nbsp;
                </td>
            </tr>
        </table>
        <asp:ObjectDataSource ID="odsSprintInfo" runat="server" SelectMethod="GetData" TypeName="DataSet1TableAdapters.SprintInformationForStatusTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="odsSprintRetrospective" runat="server" SelectMethod="GetData"
            TypeName="DataSet1TableAdapters.SprintRetrospectiveNotesTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:SqlDataSource ID="dsBurnDownChart" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
            SelectCommand="GenerateBurnDownChart" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" DefaultValue="-1" Name="SprintID"
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:ObjectDataSource ID="odsSprintTotals" runat="server" OnSelecting="odsSprintTotals_Selecting"
            SelectMethod="GetData" TypeName="DataSet1TableAdapters.GetSprintTotalsForUserTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue" />
                <asp:Parameter DefaultValue="" Name="TimeUnitHours" />
                <asp:Parameter DefaultValue="" Name="TimeThru" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="odsSprintFeatureDisc" runat="server" SelectMethod="GetData"
            TypeName="DataSet1TableAdapters.SprintReviewDiscoveredSummaryTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue" />
                <asp:SessionParameter DefaultValue="" Name="SBTime" SessionField="SBTimeMult" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="odsSprintFeatureSummary" runat="server" SelectMethod="GetData"
            TypeName="DataSet1TableAdapters.SprintReviewFeatureSummaryTableAdapter">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddSprintSelection" Name="SprintID" PropertyName="SelectedValue" />
                <asp:SessionParameter DefaultValue="" Name="SBTime" SessionField="SBTimeMult" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="odsScrumTeamPrefs" runat="server" SelectMethod="GetData"
            TypeName="DataSet1TableAdapters.ScrumTeamPrefsTableAdapter">
            <SelectParameters>
                <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </span>
    <asp:SqlDataSource ID="dsGetSprintNames" runat="server" ConnectionString="<%$ ConnectionStrings:TackleConnectionStringMain %>"
        SelectCommand="SELECT DISTINCT tblMasterBacklogSchedule.SprintName, tblMasterBacklogSchedule.EndDate, tblSprint.SprintID FROM tblSprint LEFT OUTER JOIN tblSprintBacklog ON tblSprint.SprintID = tblSprintBacklog.fSprintID RIGHT OUTER JOIN tblMasterBacklogSchedule ON tblSprint.fMasterBacklogScheduleID = tblMasterBacklogSchedule.MasterBacklogScheduleID WHERE (tblMasterBacklogSchedule.fScrumTeamID = @ScrumTeamID) AND (tblSprintBacklog.fSprintID IS NOT NULL) ORDER BY tblMasterBacklogSchedule.EndDate DESC">
        <SelectParameters>
            <asp:SessionParameter Name="ScrumTeamID" SessionField="ScrumTeamID" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>

